package shiyan3.jichu;

import shiyan3.ceshi.person;
public class Teacher extends person {
    private Course taughtCourse;

    public Teacher(String id, String name, String gender) {
        super(id, name, gender);
    }

    public void openCourse(Course course) {
        this.taughtCourse = course;
        System.out.println(name + "老师开设了课程：" + course.getCourseName());
    }

    public Course getTaughtCourse() {
        return taughtCourse;
    }

    public void setTaughtCourse(Course taughtCourse) {
        this.taughtCourse = taughtCourse;
    }
}
